<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        #getMessage{
            text-align:center
        }
    </style>
</head>
<body>
<div id="getMessage" >
    <div id="getMessageBox"></div>
    <hr>
    <button onclick="get()">手动刷新</button>
</div>
<script src="/js/jquery-3.4.1.min.js"></script>

<script>


    function get() {
        $.ajax({
            url:'/get',
            type:'GET',
            success: function (response) {
                $("#getMessageBox").append("<p>response[0]</p>" +
                    "<p>response[1]</p>" +
                    "<p>response[2]</p>" +
                    "<p>response[3]</p>" +
                    "<p>response[4]</p>" +
                    "<p>response[5]</p>" +
                    "<p>response[6]</p>");
            }
        });
        setInterval(get(),5000);

    }
</script>
</body>
</html>
